home *** CD-ROM | disk | FTP | other *** search
/ Total Network Tools 2002 / NextStepPublishing-TotalNetworkTools2002-Win95.iso / Archive / Browser Speed / WebWarper.exe / HTML / 134 < prev   
Encoding:
Text File  |  2001-05-04  |  994 b   |  31 lines

  1. <script language="VBScript">
  2.  
  3. Sub OnContextMenu()
  4.     On Error Resume Next
  5.     set l = external.menuArguments.document.parentWindow.top.document.location
  6.     a = "" & l.href
  7.     if Err then
  8.         Err.Clear
  9.         set l = external.menuArguments.document.location
  10.     end if
  11.     a = "" & l.href
  12.     if InStr(a, "http://") = 1 then
  13.         if InStr(1, a, "http://siams.com/ww.pl", 1) = 1 then exit sub
  14.         if InStr(1, a, "http://siams.com/wwl.pl", 1) = 1 then exit sub
  15.         if InStr(1, a, "http://siams.com:", 1) = 1 then
  16.             if InStr(1, a, "/ww.pl", 1) <> 0 then exit sub
  17.             if InStr(1, a, "/wwl.pl", 1) <> 0 then exit sub
  18.         end if
  19.         l.href = "http://siams.com/ww.pl?~GZ/" & Right(a, Len(a)-7)
  20.     else
  21.         alert "Sorry, WebWarper is not applicable for this page. " & Chr(13) _
  22.             & "It is viewed through the """ & l.protocol _
  23.             & """ protocol," & Chr(13) & "but WebWarper can be used only with " _
  24.             & "pages viewed" & Chr(13) & "through the ""http://"" protocol."
  25.     end if
  26. end sub
  27.  
  28. OnContextMenu()
  29.  
  30. </script>
  31.